package com.liu.springbootvalidation.entity;

import com.liu.springbootvalidation.annotation.IPAddress;
import lombok.Data;

import javax.validation.constraints.Max;
import javax.validation.constraints.NotNull;

@Data
public class User {
    @Max(value = 18,message = "age不能大于18")
    private Integer age;

    @NotNull(message = "name不能为空")
    private String name;

    @IPAddress
    private String ipaddr;
}
